package com.yb0os1.decorator.springtest;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/api")
public class MyController {
    //需求，一个自定义注解 让map自动增加一个时间戳
    @PostMapping
    public Map<String, Object> test(@TimestampRequestBody Map<String, Object> json) {
        return json;
    }
}
